package com.bwie.controller;

import com.bwie.service.TbUserService;
import com.bwie.utils.R;
import com.bwie.vo.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description:
 *
 * @Author zhaohaoyang
 * @Create 2025/7/11 10:34
 * @Version 1.0
 */
@RestController
@RequestMapping("/user/index")
public class IndexController {
    @Autowired
    TbUserService tbUserService;

    /**
     * 登录
     * @param loginVo
     * @return
     */
    @PostMapping("/login")
    public R login(@RequestBody LoginVo loginVo){
        return tbUserService.login(loginVo);
    }
}
